#include <memory>
#include "tcpserver.hpp"



void Usage(const std::string& s)
{
	std::cout << "\n\t" << s << " port[1024+]" << std::endl;
}

int main(int argc,char* argv[])
{
	if(argc != 2){
		Usage(argv[0]);
		return 0;
	}
	lg.Enable(Classfile);
	uint16_t port = std::stoi(argv[1]);
	std::unique_ptr<Tcpserver> server(new Tcpserver(port));        /// udp和tcp都不能使用公网ip，如：Tcpserver(port,"47.122.50.102")
	server->Init();
	server->Start();

	return 0;
}